package com.bgs.service;

import com.bgs.mapper.MailMapper;
import com.bgs.pojo.DepartmentVo;
import com.bgs.pojo.EmployeeVo;
import com.bgs.pojo.EnterpriseVo;
import com.bgs.tool.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MailServiceImpl implements MailService{
    @Autowired
    private MailMapper mailMapper;

    @Override
    public List<EnterpriseVo> getMe(Integer eid) {
        return mailMapper.getMe(eid);
    }

    @Override
    public R getgo(Integer enterId) {
        List <DepartmentVo> list = mailMapper.getgo(enterId);
        return R.ok().data("list",list);
    }

    @Override
    public List<EmployeeVo> getLike(Integer departmentid) {
        return mailMapper.getLike(departmentid);
    }

    @Override
    public List<EmployeeVo> getPeo(Integer eid) {
        return mailMapper.getPeo(eid);
    }
}
